#-*- coding = utf-8 -*-
#@Time : 2021/2/7 18:20
#@Author :熊小熊
#@File :guanbudiaodechangkou.py
#@Software : PyCharm Community Edition


from tkinter import *
class bxjzy:
    def __init__(self):
        window = Tk()
        label = Label(window, text='我是不是可以不交作业？')
        self.btyes = Button(window, text='不是', height=1, width=6)
        self.btno = Button(window, text='是的', height=1, width=6)
        label.place(x=60, y=70)
        self.btyes.place(x=40, y=130)
        self.btno.place(x=120, y=130)
        self.btyes.bind('<Enter>', self.event1)  
        self.btno.bind('<Enter>', self.event2)
        window.mainloop()

    def event1(self, event):  
        self.btyes['text'] = '是的'
        self.btno['text'] = '不是'

    def event2(self, event):
        self.btyes['text'] = '不是'
        self.btno['text'] = '是的'


bxjzy()
window = Tk()
label = Label(window, text='关闭窗口我就当你是默认了')
label.place(x=2, y=80)
button = Button(window, text='确定', command=window.destroy)
button.place(x=80, y=150)
window.mainloop()
